import Mock from 'mockjs'
import { Random } from 'mockjs'

const data = Mock.mock({
    code: '200',
    message: '请求成功',
    "data|5-10": [
        {
            "id|+1": 1,
            img: Random.image(),
            'title': '@cword(3,10)',
            "message": '@cword(300,500)',
        }
    ]
})

Mock.mock('/myMessage', 'post', (config) => {
    // console.log(JSON.parse(config.body))
    return data
})